<?php defined('BASEPATH') or exit('No direct script access allowed');

class Seller_m extends MY_Model {
	
	function __construct(){
		parent::__construct();
		$this->load->library('module_helper');
	}
	
	function authorization(){
		if(!isset($_SESSION['user'])){
			show_404();exit();
		}else{
			$USER = $this->user_entity->init('id',$_SESSION['user']['id']);
			if($USER->getAccType() == 'buyer'){
				show_404();exit();
			}
		}
	}
	
	function _buildMenu($task){	
	 	$menu_array2 = array ( 
			array('link'=> site_url('seller/my_shows/upcoming_shows'), 'module'=>'upcoming_shows', 'title'=> 'Upcoming shows', 'extra'=>'' ),
			array('link'=> site_url('seller/my_shows/past_shows'), 'module'=>'past_shows', 'title'=> 'Past shows', 'extra'=>'' ),
			array('link'=> site_url('seller/my_shows/all_shows'), 'module'=>'all_shows', 'title'=> 'All shows', 'extra'=>'' ),
		);
		 
		$menu_array = array ( 
			array('link'=> site_url('seller/add_show'), 'module'=>'add_show', 'title'=> 'New Show', 'extra'=>'' ), 
			array('link'=> site_url('seller/my_shows'), 'module'=>'my_shows', 'title'=> 'My Shows','extra'=>'<ul>'.$this->module_helper->build_HTML_nav($menu_array2, $task ).'</ul>' ), 
			array('link'=> site_url('seller/my_account'), 'module'=>'my_account', 'title'=> 'My Account','extra'=>"" ),
			array('link'=> site_url('seller/dispute'), 'module'=>'dispute', 'title'=> 'Dispute','extra'=>"" ),
		);
		
		$navigator = $this->module_helper->build_HTML_nav($menu_array, $this->method );	
		return $navigator;
	}
	
	function index(){
		return array(  );
	}
	

}